<!--
To change this template, choose Tools | Templates
and open the template in the editor.
-->
<!DOCTYPE html>
<html>
    <head>
        <title></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <?php 
            //Require your file here
            require_once 'template/pagination.php';
            require_once 'model/works.php';
            
            //Create global variable
            $md_works = new Works();
            $works = $md_works->select();
            $total=count($works);
            $pagination= new Pagination();
            $page=5;
            echo $pagination->display($total, $page);
        ?>
        
    </head>
    <body>
        <!-- Include header-->
        <?php include('template/header.php')?>
        
        <div class="content">
            <table>
                <tr>
                    <td>Id</td>
                </tr>
            <?php foreach ($works as $work):?>
                <tr>
                    <td>
                        <?php echo $work['id'] ?>
                    </td>
                </tr>
            <?php endforeach;?>
            </table>
        </div>
        
        <!-- Include footer-->
        <?php include ('template/footer.php') ?>
    </body>
</html>
